<div class="mt-3">
    <%= if assigns[:label] do %>
        <%= label @f, @field, @label, class: "block text-sm font-medium leading-6 text-gray-900" %>
    <% else %>
        <%= label @f, @field, class: "block text-sm font-medium leading-6 text-gray-900" %>
    <% end %>
    <div class="mt-2">
        <%= text_input @f, @field, type: assigns[:type] || :text, required: true, class: "block w-full rounded-md border-0 py-1.5 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" %>
        <%= error_tag @f, @field %>
    </div>
</div>
